<!-- components/navigation/MobileMask.vue -->
<template>
  <div 
    v-if="isMobile && isOpen" 
    class="mobile-mask" 
    @click="closeMenu"
  ></div>
</template>

<script setup lang="ts">
// @ts-nocheck
defineProps<{
  isMobile: boolean
  isOpen: boolean
}>()

const emit = defineEmits<{
  (e: 'close'): void
}>()

const closeMenu = () => {
  emit('close')
}
</script>

<style scoped>
.mobile-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1999;
}

/* 桌面端 */
@media (min-width: 768px) {
  .mobile-mask {
    display: none;
  }
}
</style>